The SQLite Query Optimizer Overview
from 20241213
The SQLite Query Optimizer Overview
https://sqlite.org/optoverview.html
SQLiteはNested Loop Joinを実装している
The default order of the nested loops in a join is for the left-most table in the FROM clause to form the outer loop and the right-most table to form the inner loop. However, SQLite will nest the loops in a different order if doing so will help it to select better indexes.
FROM 句の左端のテーブルが外側のループを形成
右端のテーブルが内側のループを形成
SQLite は、より適切なインデックスを選択するのに役立つ場合、ループを別の順序でネストする。